<?php $__nModel__ = new Native()?>
<ul class='ttc-cate-nav'>
<?php $count = count($model); foreach ($model as $key=>$one):?>
	<li <?php if($key+1 == $count) echo 'class="last"';?>>
		<?php $form = $this->beginWidget('CActiveForm', array(
			'method' => 'get',
			'action' => Yii::app()->createUrl('provide/channel/nativeList'),
		))?>
		<span><span>▪</span>
		<?php echo LyscHtml::buttonList(
			$form, $__nModel__, 'type_id', 
			array($one->id=>$one->name)
			, array(
				'tagName' => 'em',
				'itemTemplate' => '<a class="a-black" href="javascript:void(0)" key="{key}">{value}('.$one->count.')</a>'
			)
		)?></span>
		<?php $this->endWidget();?>
		<?php $data = CHtml::listData($one->descendants, 'id', 'name')?>
		<?php $form = $this->beginWidget('CActiveForm', array(
			'method' => 'get',
			'action' => Yii::app()->createUrl('provide/channel/nativeList'),
		))?>
		<?php echo LyscHtml::buttonList(
			$form, $__nModel__, 'type_id', $data, array(
				'tagName' => 'p',
				'itemTemplate' => '<a class="ttc-cate-nav-sub" href="javascript:void(0)" key="{key}">{value}</a>'
			)
		)?>
	</li>
	<?php $this->endWidget();?>
<?php endforeach;?>
</ul>
